<template>
	<div class="mainCont">
		<div class="leftCont">
			<ul class="snav">

				<li v-if="$permissions.indexOf(131) != -1">
					<router-link to="/property" v-if="$route.name=='property'" @click.native="flushCom"
						:class="$route.name=='property'?'active':''">资产列表</router-link>
					<router-link to="/property" v-else :class="$route.name=='property'?'active':''">资产列表</router-link>
				</li>
				<li v-if="$permissions.indexOf(147) != -1">
					<router-link to="/editApprove" v-if="$route.name=='editApprove'" @click.native="flushCom"
						:class="$route.name=='editApprove'?'active':''">变更审批</router-link>
					<router-link to="/editApprove" v-else :class="$route.name=='editApprove'?'active':''">变更审批</router-link>
				</li>
				<li v-if="$permissions.indexOf(149) != -1">
					<router-link to="/scrapApprove" v-if="$route.name=='scrapApprove'" @click.native="flushCom"
						:class="$route.name=='scrapApprove'?'active':''">报废审批</router-link>
					<router-link to="/scrapApprove" v-else :class="$route.name=='scrapApprove'?'active':''">报废审批</router-link>
				</li>
				<li v-if="$permissions.indexOf(142) != -1">
					<router-link to="/scrap" v-if="$route.name=='scrap'" @click.native="flushCom"
						:class="$route.name=='scrap'?'active':''">资产报废</router-link>
					<router-link to="/scrap" v-else :class="$route.name=='scrap'?'active':''">资产报废</router-link>
				</li>

				<li v-if="$permissions.indexOf(137) != -1 || $permissions.indexOf(140) != -1">
					<a href="#" @click="down5=!down5">设置 <span class="iconfont icon-up"
							:style="down5?'transform: rotateZ(180deg);':'transform: rotateZ(0deg);'"></span></a>
					<div class="down" v-if="down5">
						<router-link to="/brand" v-if="$route.name=='brand' && $permissions.indexOf(137) != -1"
							@click.native="flushCom" :class="$route.name=='brand'?'active':''">资产品牌
						</router-link>
						<router-link to="/brand" v-if="$permissions.indexOf(137) != -1 && $route.name !='brand' "
							:class="$route.name=='brand'?'active':''">资产品牌
						</router-link>

						<router-link to="/assetType" v-if="$route.name=='assetType' && $permissions.indexOf(137) != -1"
							@click.native="flushCom" :class="$route.name=='assetType'?'active':''">资产类型
						</router-link>
						<router-link to="/assetType"
							v-if="$permissions.indexOf(137) != -1 && $route.name !='assetType' "
							:class="$route.name=='assetType'?'active':''">资产类型
						</router-link>
						<router-link to="/print" v-if="$route.name=='print' && $permissions.indexOf(140) != -1"
							@click.native="flushCom" :class="$route.name=='print'?'active':''">打印二维码
						</router-link>
						<router-link v-if="$permissions.indexOf(140) != -1 && $route.name !='print' " to="/print"
							:class="$route.name=='print'?'active':''">打印二维码
						</router-link>
					</div>
				</li>
			</ul>

		</div>

		<div class="rightCont">
			<router-view>
			</router-view>
		</div>

	</div>
</template>
<script type="text/babel">
	import Vue from 'vue'
	export default {
		name: "",
		data() {
			return {
				down5:true,
				permissions:[]
			};
		},
		created() {},
		mounted() {
			// // console.log(123)
			var that = this
			// // console.log(this.$route.params.title)
			// if(!this.$route.params.title){
				
			// var url = ''
			// console.log(that.$permissions)
			// setTimeout(function(){
				that.permissions = that.$permissions
			// 	// console.log(that.permissions.indexOf(131))
			// 	if(that.permissions.indexOf(131) != -1){
			// 		that.$router.push('/property');
			// 	}else if(that.permissions.indexOf(147) != -1){
			// 		that.$router.push('/editApprove');
			// 	}else if(that.permissions.indexOf(149) != -1){
			// 		that.$router.push('/scrapApprove');
			// 	}else if(that.permissions.indexOf(142) != -1){
			// 		that.$router.push('/scrap');
			// 	}else if(that.permissions.indexOf(137) != -1){
			// 		that.$router.push('/brand');
			// 	}else if(that.permissions.indexOf(140) != -1){
			// 		that.$router.push('/print');
			// 	}
				
			// },200)
			// }else{
			// 	that.permissions = that.$permissions
			// }
			
		},
	
		methods: {
			flushCom:function(){
				return
		　　},
			
		},

		computed: {
			
		},
	};
</script>
<style lang='less' scoped>
	/deep/sup {
		top: 0;
		margin-bottom: 3px;
	}

	/deep/.el-badge__content {
		height: auto;
	}

	li {
		background: #fff;
		position: relative;
		z-index: 2;

	}

	.rightCont {
		position: relative;
	}

	.icon-up {
		transition: all .3s;
	}

	.down {
		transition: all .3s;
	}
</style>
